Template/Theme System
-------------------------------------------------- 
The ContentCourier templating system, also known as themes in some CMSs, comprise of a single HTML or XHTML file. The Template URI, which corresponds directly to a file path in the default deployment, is set in the config file. By default, all requests will use the template that's specified by the Template URI attribute in the root level &lt;site-config /&gt; tag.

In addition, each individual Page URI may have a custom Template URI.  This allows an individual page the option of maintaining design continuity over the life of a site.  You've probably noticed this page has a different design from the rest of the pages in the default deployment.  If you look at the site config, you'll see the summer-holiday template specified for the entire site

    <site-config templateURI="theme-templates/summer-holiday/index.html">

while this specific page has the grass_stains template applied.

    <uri templateURI="theme-templates/grass_stains/index.html">
        /documentation/template-system
    </uri>
    
ContentCourier templates have no pre-defined sections.  There's no "navigation" section or "footer" section unless you want there to be.  Sections are defined in the site config &lt;sections /&gt; node.  For each section in this node, you may place an empty node-token in your template.

It's a bit easier to show you.  Let's assume your &lt;sections /&gt; node looks something like this

    <sections defaultProcessor="none">
        <main    defaultContentURI="/home.php" passthrough="passthrough" processor="markdown">
            <map pageURI="/faq" contentURI="/faq.txt" />
        </main>
        <nav defaultContentURI="/nav.php" processor="none" />
        <header  defaultContentURI="/header.php" processor="none" />
        <sidebar defaultContentURI="/sidebar.php" processor="markdown"></sidebar>
    </sections>
    
This means you've defined your site to have a section called main, a section called nav, a section called header, and a section called sidebar.  Don't worry about the attributes, they have 

With these sections defined, an extremely simple template would look something like this.

    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>My Very Simple Site</title>
    </head>
    <body>
        <header />
        <hr />
        <nav />
        <hr />
        <main />
    </body>
    </html>

The &lt;header /&gt;, &lt;nav /&gt; and &lt;main /&gt; tokens will be replaced by the appropriate content for that section.  Notice that we've left the &lt;sidebar /&gt; token out of this template.  You don't need to use all your sections in a template.

Implementation Note
-------------------------------------------------- 
While the empty node section tokens make the teamplte look like a XML file, it isn't.  Those tokens are simple string replacements, so make sure you copy the format exactly as is.  In other words, the following is good

    <header />
    
While this next line is bad

    <header   />

Future version of Content Courier may remedy this, but until then, suffer at our  Perl/string-replacement roots.